using System.Collections.Generic;

namespace System.Text
{
	internal static class DelimitedStringExtensions
	{
		/// <summary>
		/// Toes the delimited string.
		/// </summary>
		/// <typeparam name="T">The specified type of the source enumeration.</typeparam>
		/// <param name="enumerable">The enumerable.</param>
		public static string ToDelimitedString<T>(this IEnumerable<T> enumerable)
		{
			return DelimitedStringBuilder.ToString(enumerable);
		}

		/// <summary>
		/// Toes the delimited string.
		/// </summary>
		/// <typeparam name="T">The specified type of the source enumeration.</typeparam>
		/// <param name="enumerable">The enumerable.</param>
		/// <param name="allowNulls">if set to <c>true</c> [allow nulls].</param>
		public static string ToDelimitedString<T>(this IEnumerable<T> enumerable, bool allowNulls)
		{
			return DelimitedStringBuilder.ToString(enumerable, allowNulls);
		}

		/// <summary>
		/// Toes the delimited string.
		/// </summary>
		/// <typeparam name="T">The specified type of the source enumeration.</typeparam>
		/// <param name="enumerable">The enumerable.</param>
		/// <param name="delimiter">The delimiter.</param>
		public static string ToDelimitedString<T>(this IEnumerable<T> enumerable, string delimiter)
		{
			return DelimitedStringBuilder.ToString(enumerable, delimiter);
		}

		/// <summary>
		/// Toes the delimited string.
		/// </summary>
		/// <typeparam name="T">The specified type of the source enumeration.</typeparam>
		/// <param name="enumerable">The enumerable.</param>
		/// <param name="delimiter">The delimiter.</param>
		/// <param name="allowNulls">if set to <c>true</c> [allow nulls].</param>
		public static string ToDelimitedString<T>(this IEnumerable<T> enumerable, string delimiter, bool allowNulls)
		{
			return DelimitedStringBuilder.ToString(enumerable, delimiter, allowNulls);
		}

	}
}